package su2010.puz.impl;

import java.awt.Image;
import java.awt.image.BufferedImage;

import com.matthewtavares.jipt.processing.ImageOperator;
import com.matthewtavares.jipt.processing.LaplacianSharpener;

import su2010.puz.Filter;
import su2010.puz.ImageHelper;

/**
 * Sharpen filter using Laplacian Sharpener implementation from JIPT
 * (http://sourceforge.net/projects/jipt/)
 *
 */
public class SharpenFilter implements Filter {

	@Override
	public BufferedImage apply(BufferedImage img) {
		ImageOperator sharpen =  new LaplacianSharpener();
		Image image = sharpen.transform(img);
		return ImageHelper.getBufferedImage(image);
	}
	
}
